﻿using InnoWeb.CEND.Core.Model.News;
using InnoWeb.CEND.Data.Mapping.BaseMapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InnoWeb.CEND.Data.Mapping.News
{
    public class NewsItemMapping : BaseMappingConfiguration<NewsItem, int>
    {
        public NewsItemMapping()
        {
            this.Property(a => a.Name).IsRequired().HasMaxLength(100);
            this.Property(a => a.NameTR).IsRequired().HasMaxLength(100);

            this.HasMany(a => a.NewsContents).WithRequired(a => a.NewsItem);
        }
    }
}
